package com.yidu.drug.dao;

import java.util.List;

import com.yidu.drug.model.QualityTestingModel;
/**
 * 质检表
 * @author lsj
 *
 */
public interface QualityTestingModelMapper {
	/**
     * 删除
     * @param record
     * @return
     */
	int deleteByPrimaryKey(String qtId);
    /**
     * 增加
     * @param record
     * @return
     */
    int insert(QualityTestingModel record);
    /**
     * 增加
     * @param record
     * @return
     */
    int insertSelective(QualityTestingModel record);
    
    /**
     * 根据质检表ID查询数据
     * @param qtId
     * @return
     */
    QualityTestingModel selectByPrimaryKey(String qtId);
    
    /**
     * 根据总报表查询数据
     * @param sumId
     * @return
     */
    List<QualityTestingModel> selectByPrimaryKeyTwo(String sumId);
    
    /**
     * 根据数据修改
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(QualityTestingModel record);
    
    /**
     * 修改
     * @param record
     * @return
     */
    int updateByPrimaryKey(QualityTestingModel record);
    
    /**
     * 修改
     * @param record
     * @return
     */
    int update(QualityTestingModel record);
    
    
    /**
     * 质检总表修改
     * @param record
     * @return
     */
    int updateTwo(QualityTestingModel record);
    
    /**
	 * 根据采购订单ID(业务ID)查询出采购明细中的所有信息
	 */
    List<QualityTestingModel> findByfdPwId(String pwId);
  
    /**
	 * 查询总行数
	 */
	public Long findRows(QualityTestingModel record);

	/**
	 * 查询所有管理人员数据
	 */
	public List<QualityTestingModel> findAllQualityTestingModel(QualityTestingModel record);

	/**
	 * 根据ID查询
	 */
	public QualityTestingModel findById(String picId);
	
	List<QualityTestingModel> findDrugProductionQualityTesting(QualityTestingModel record);
	
	long findDrugProductionQualityTestingRows(QualityTestingModel record);
	
	List<QualityTestingModel> findMaterialsPurchaseQualityTesting(QualityTestingModel record);
	
	long findMaterialsPurchaseQualityTestingRows(QualityTestingModel record);
}